from enum import Enum

# 飞行器状态枚举
class DroneModeCodeEnum(Enum):
    STANDBY = 0  # 待机
    TAKEOFF_PREPARE = 1  # 起飞准备
    TAKEOFF_PREPARE_DONE = 2  # 起飞准备完毕
    MANUAL_FLIGHT = 3  # 手动飞行
    AUTO_TAKEOFF = 4  # 自动起飞
    ROUTE_FLIGHT = 5  # 航线飞行
    PANORAMA_PHOTO = 6  # 全景拍照
    INTELLIGENT_FOLLOW = 7  # 智能跟随
    ADSB_AVOID = 8  # ADS-B 躲避
    AUTO_RETURN = 9  # 自动返航
    AUTO_LANDING = 10  # 自动降落
    FORCED_LANDING = 11  # 强制降落
    TRIPLE_BLADE_LANDING = 12  # 三桨叶降落
    UPGRADING = 13  # 升级中
    DISCONNECTED = 14  # 未连接
    APAS = 15  # APAS
    VIRTUAL_JOYSTICK = 16  # 虚拟摇杆状态
    COMMAND_FLIGHT = 17  # 指令飞行
    
# 降落类型
class LandingTypeEnum(Enum):
    NOT_LANDED = 0  # 未降落
    AIRPORT_LANDING = 1  # 机场内降落
    ALTERNATE_LANDING = 2  # 备降点降落
    USER_TRIGGERED_LANDING = 3  # 用户主动触发降落
    AUTONOMOUS_LANDING = 4  # 飞行器自身触发降落
    
    
# 降落检测    #开启避障情况下紧急降落，飞行器会开启降落检测
class LandingProtectionTypeEnum(Enum):
    NOT_DETECTED = 0  # 未开启检测
    UNEVEN_GROUND_OR_WATER = 1  # 检测到地面不平或者下方是水面，不适合降落，降落任务退出
    NO_GROUND_DETECTED = 2  # 没有检测出地面情况，降落任务退出
    AIRPORT_LANDING_DETECTION = 3  # 机场内降落检测
